<html><head>
      <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
   <title>Exchange Property</title><link rel="stylesheet" type="text/css" href="eclipse_book.css"><meta name="generator" content="DocBook XSL Stylesheets V1.77.1"><link rel="home" href="index.html" title="Red Hat Fuse Tooling"><link rel="up" href="RiderExLang.html" title="Part&nbsp;III.&nbsp;Expression and Predicates Languages"><link rel="prev" href="PHP.html" title="PHP (DEPRECATED)"><link rel="next" href="Python.html" title="Python (DEPRECATED)"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="chapter"><div class="titlepage"><div><div><h2 class="title"><a name="Property"></a>Exchange Property</h2></div></div></div><div class="simplesect"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="topic-33703"></a>Overview</h2></div></div></div><p>The exchange property language provides a convenient way of accessing <span class="strong"><strong>exchange
properties</strong></span>. When you supply a key that matches one of the exchange
property names, the exchange property language returns the corresponding value.</p><p>The exchange property language is part of <code class="literal">camel-core</code>.</p></div><div class="simplesect"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="topic-33704"></a>XML example</h2></div></div></div><p>For example, to implement the recipient list pattern when the <code class="literal">listOfEndpoints</code>
exchange property contains the recipient list, you could define a route as follows:</p><pre class="screen">&lt;camelContext&gt;
  &lt;route&gt;
    &lt;from uri="direct:a"/&gt;
    &lt;recipientList&gt;
      &lt;exchangeProperty&gt;listOfEndpoints&lt;/exchangeProperty&gt;
    &lt;/recipientList&gt;
  &lt;/route&gt;
&lt;/camelContext&gt;</pre></div><div class="simplesect"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="topic-33705"></a>Java example</h2></div></div></div><p>The same recipient list example can be implemented in Java as follows:</p><pre class="screen">from("direct:a").recipientList(exchangeProperty("listOfEndpoints"));</pre></div></div></body></html>